package ressources;

import java.io.FileInputStream;
import java.io.IOException;
import java.io.InputStream;
import java.util.Properties;

import exceptions.WrongLanguageException;

public class LoadRessources {
	
	Properties prop = new Properties();
	InputStream in = null;
	
	public LoadRessources (String lang) throws WrongLanguageException, IOException {
		String filename = null;
		if(lang.equals("de")) {
			filename = "properties/de.properties";
		} else if(lang.equals("en")) {
			filename = "properties/en.properties";
		} else {
			filename = "properties/default.properties";
		}
		
		prop.load(new FileInputStream(filename));
		
		//System.out.print(prop.toString());
		
	}
	
	public Properties getProperties() {
		return this.prop;
	}
	
}
